package com.own.component.autoconfig.property.security;

import com.own.constant.ConstantValue;
import lombok.Data;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

import java.util.ArrayList;
import java.util.List;

/**
 * SecurityProperties
 *
 * @author chenxueli
 * @date 2023-10-11 15:30:58
 */
@Data
@SpringBootConfiguration
@ConfigurationProperties(prefix = SecurityProperties.PREFIX)
public class SecurityProperties {

    public static final String PREFIX = ConstantValue.CONFIG_VALUE_CONTENT + "security";

    /**
     * 是否执行登录校验
     */
    private boolean loginVerification = false;

    /**
     * 排除的字段信息
     */
    private List<String> excludePathPatterns = new ArrayList<>();

    /**
     * 权限配置
     */
    @NestedConfigurationProperty
    private PermissionProperty permission = new PermissionProperty();

}
